<%@ page contentType="text/html;charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page import="com.yaodian100.core.common.utils.ServerValue"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%@ include file="/taglibs.jsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/functions" prefix="fn" %> 	
	<!-- 验证 -->
	<script type="text/javascript" charset="UTF-8" src="/js/formValidator_min.js" charset="UTF-8"></script>
	<script type="text/javascript" charset="UTF-8" src="/js/formValidator.js" charset="UTF-8"></script>
	<script type="text/javascript" charset="UTF-8" src="/js/formValidatorRegex.js" charset="UTF-8"></script>
	<!-- 数字验证 -->
	<script type="text/javascript" charset="UTF-8" src="/js/jquery.alphanumeric.js"></script>
			<script type="text/javascript" charset="UTF-8" src="/js/jquery.datepick.js"></script>
<script type="text/javascript" charset="UTF-8" src="/js/jquery.datepick-zh-CN.js"></script>
<link rel="stylesheet" type="text/css" href="/css/smoothness.datepick.css"/>
<link rel="stylesheet" href="/css/jquery.tooltip.css" />
<script src="/js/jquery.tooltip.min.js" type="text/javascript"></script>
	<script language="javascript"><!--
	$().ready( function() {
		
	});
	--></script>			
<h1>商品管理 - 商品规格<br/>
	<div class="f-link">
		<a href="<%=ServerValue.getMidContextPath()%>/product/list.do">回商品列表页</a>
	</div>
</h1>
<s:actionerror />
<s:actionmessage />
<s:fielderror />
<br/>

<c-rt:if test="${not empty product.productId}">
	<jsp:include page="/WEB-INF/jsp/product/commonMenu2.jsp"/>
</c-rt:if>
<s:form action="saveSpec.do" method="post" id="specForm">
	<table class="tb-data" width="100%">
		<thead>
		 <tr>
				<th>商品名称<br/>（商品编号）</th>
				<td colspan="5">${product.productName}(${productId})</td>
		 </tr>	
		  <tr>
				<th>规格名称<br/></th>
				<td colspan="5">${specification.specificationName}</td>
		 </tr>	
	   <tr>
	       <th>销售中库存查询 </th>
	     <td>
	      <c-rt:if test="${fn:length(orderNoShippingList)>0}">
				<c-rt:forEach items="${orderNoShippingList}" var="orderNoShipping" varStatus="index">
					訂單狀態：${orderStMenu.options[orderNoShipping[0]].name}
						數量：${orderNoShipping[1]}<BR/>
				</c-rt:forEach>
			</c-rt:if>	
			 <c-rt:if test="${fn:length(orderNoShippingList)==0}">0</c-rt:if>
	     </td>
	   </tr>
	    <tr>
	       <th> 可售数 </th>
	     <td>
	     <c-rt:if test="${not empty specificationinventory}">
				 可售数(${specificationinventory.availableInventory-specificationinventory.soldInventory+specificationinventory.cancelInventory})=库存数(${specificationinventory.availableInventory})-已售数(${specificationinventory.soldInventory})+取消数(${specificationinventory.cancelInventory})
				 </c-rt:if>
				  <c-rt:if test="${empty specificationinventory}">0</c-rt:if>
	     </td>
	   </tr>
		</thead>
	  <tbody>
			                   
	  </tbody>			
	</table>
 </s:form>